package com.rain.spit.dao;

import com.rain.spit.pojo.Spit;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

/**
 * 吐槽的持久层接口
 * @auther 德哲
 * @date 2019/4/28 14:17.
 */
public interface SpitDao extends MongoRepository<Spit,String> {

    /**
     * 根据父级id查询吐槽列表
     * @param parentid
     * @param pageable
     * @return
     */
    Page<Spit> findByParentid(String parentid, Pageable pageable);

}
